<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html id="htmlId">
<head>
    <title>Coverage Report :: SinglePlayerGame</title>
    <style type="text/css">
        @import "../../.css/coverage.css";
    </style>
</head>

<body>
<div class="header"></div>

<div class="content">
    <div class="breadCrumbs">
        [ <a href="../../index.html">all classes</a> ]
        [ <a href="../index.html">nl.tudelft.jpacman.game</a> ]
    </div>

    <h1>Coverage Summary for Class: SinglePlayerGame (nl.tudelft.jpacman.game)</h1>

    <table class="coverageStats">
        <tr>
            <th class="name">Class</th>
            <th class="coverageStat
">
                Class, %
            </th>
            <th class="coverageStat
">
                Method, %
            </th>
            <th class="coverageStat
">
                Line, %
            </th>
        </tr>
        <tr>
            <td class="name">SinglePlayerGame</td>
            <td class="coverageStat">
  <span class="percent">
    0%
  </span>
                <span class="absValue">
    (0/ 1)
  </span>
            </td>
            <td class="coverageStat">
  <span class="percent">
    0%
  </span>
                <span class="absValue">
    (0/ 4)
  </span>
            </td>
            <td class="coverageStat">
  <span class="percent">
    0%
  </span>
                <span class="absValue">
    (0/ 9)
  </span>
            </td>
        </tr>

    </table>

    <br/>
    <br/>


    <div class="sourceCode"><i>1</i>&nbsp;package nl.tudelft.jpacman.game;
        <i>2</i>&nbsp;
        <i>3</i>&nbsp;import java.util.List;
        <i>4</i>&nbsp;
        <i>5</i>&nbsp;import nl.tudelft.jpacman.level.Level;
        <i>6</i>&nbsp;import nl.tudelft.jpacman.level.Player;
        <i>7</i>&nbsp;
        <i>8</i>&nbsp;import com.google.common.collect.ImmutableList;
        <i>9</i>&nbsp;import nl.tudelft.jpacman.points.PointCalculator;
        <i>10</i>&nbsp;
        <i>11</i>&nbsp;/**
        <i>12</i>&nbsp; * A game with one player and a single level.
        <i>13</i>&nbsp; *
        <i>14</i>&nbsp; * @author Jeroen Roosen
        <i>15</i>&nbsp; */
        <b class="nc"><i>16</i>&nbsp;public class SinglePlayerGame extends Game {</b>
        <i>17</i>&nbsp;
        <i>18</i>&nbsp; /**
        <i>19</i>&nbsp; * The player of this game.
        <i>20</i>&nbsp; */
        <i>21</i>&nbsp; private final Player player;
        <i>22</i>&nbsp;
        <i>23</i>&nbsp; /**
        <i>24</i>&nbsp; * The level of this game.
        <i>25</i>&nbsp; */
        <i>26</i>&nbsp; private final Level level;
        <i>27</i>&nbsp;
        <i>28</i>&nbsp; /**
        <i>29</i>&nbsp; * Create a new single player game for the provided level and player.
        <i>30</i>&nbsp; *
        <i>31</i>&nbsp; * @param player
        <i>32</i>&nbsp; * The player.
        <i>33</i>&nbsp; * @param level
        <i>34</i>&nbsp; * The level.
        <i>35</i>&nbsp; * @param pointCalculator
        <i>36</i>&nbsp; * The way to calculate points upon collisions.
        <i>37</i>&nbsp; */
        <i>38</i>&nbsp; protected SinglePlayerGame(Player player, Level level, PointCalculator pointCalculator) {
        <b class="nc"><i>39</i>&nbsp; super(pointCalculator);</b>
        <i>40</i>&nbsp;
        <b class="nc"><i>41</i>&nbsp; assert player != null;</b>
        <b class="nc"><i>42</i>&nbsp; assert level != null;</b>
        <i>43</i>&nbsp;
        <b class="nc"><i>44</i>&nbsp; this.player = player;</b>
        <b class="nc"><i>45</i>&nbsp; this.level = level;</b>
        <b class="nc"><i>46</i>&nbsp; this.level.registerPlayer(player);</b>
        <i>47</i>&nbsp; }
        <i>48</i>&nbsp;
        <i>49</i>&nbsp; @Override
        <i>50</i>&nbsp; public List&lt;Player&gt; getPlayers() {
        <b class="nc"><i>51</i>&nbsp; return ImmutableList.of(player);</b>
        <i>52</i>&nbsp; }
        <i>53</i>&nbsp;
        <i>54</i>&nbsp; @Override
        <i>55</i>&nbsp; public Level getLevel() {
        <b class="nc"><i>56</i>&nbsp; return level;</b>
        <i>57</i>&nbsp; }
        <i>58</i>&nbsp;}
    </div>
</div>

<div class="footer">

    <div style="float:right;">generated on 2023-04-25 16:45</div>
</div>
</body>
</html>
